home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / musictex / older-versions / musictex.507 / MUSICVBM.TEX < prev    next >
Text File  |  1993-12-31  |  3KB  |  95 lines

  1. % adjustable beam slopes
  2. % #1: beam number, #2: starting pitch, #3: ending pitch, #4: extension (number
  3. %                                                            of \noteskip's)
  4. \edef\catcodeat{\the\catcode`\@}\catcode`\@=11
  5.  
  6. \def\Ibu#1{\selectpoutre{#1}\I@bu{\i@bu}}%
  7. \def\Ibbu#1{\selectpoutre{#1}\I@bu{\i@bbu}}%
  8. \def\Ibbbu#1{\selectpoutre{#1}\I@bu{\i@bbbu}}%
  9. \def\Ibbbbu#1{\selectpoutre{#1}\I@bu{\i@bbbbu}}%
  10. \def\Ibl#1{\selectpoutre{#1}\I@bl{\i@bl}}%
  11. \def\Ibbl#1{\selectpoutre{#1}\I@bl{\i@bbl}}%
  12. \def\Ibbbl#1{\selectpoutre{#1}\I@bl{\i@bbbl}}%
  13. \def\Ibbbbl#1{\selectpoutre{#1}\I@bl{\i@bbbbl}}%
  14. %
  15. \newcount\s@lopenum
  16. \newcount\the@pitch
  17. \newdimen\b@eamlength
  18. %
  19. % compute altitude difference of tried beam in \y@iv
  20. % and compare with notes altitude difference
  21. %
  22. \def\I@buuchk{\y@iv=0.05\b@eamlength\multiply \y@iv by \s@lopenum\relax
  23. \ifdim \y@iv>\n@ii\internote\relax
  24.   \advance\s@lopenum by -1\relax\I@buuchk
  25. \fi
  26. \ifnum \s@lopenum>9\relax  \advance\n@i by 1\relax
  27.   \advance\n@ii by -1\relax\I@buuchk
  28. \fi}%
  29. %
  30. \def\I@budchk{\y@iv=0.05\b@eamlength\multiply \y@iv by \s@lopenum\relax
  31. \ifdim \y@iv<\n@ii\internote\relax
  32.   \advance\s@lopenum by 1\relax\I@budchk
  33. \fi}%
  34. %
  35. \def\I@bu#1#2#3#4{{\inhgetn@i{#3}\n@ii=\n@i\relax
  36. \inhgetn@i{#2}\advance\n@ii by -\n@i\relax
  37. \b@eamlength=\noteskip
  38. \multiply\b@eamlength by #4\relax
  39. \ifnum\n@ii=0\relax
  40.    \edef\I@boper{\noexpand #1}\I@boper{#2}0\relax
  41. \else\ifnum\n@ii>0\relax\s@lopenum=10\relax \I@buuchk
  42.       \else \s@lopenum=-10\relax \I@budchk
  43.       \fi
  44.    \edef\I@boper{\noexpand #1{\the\n@i}{\the\s@lopenum}\relax}\I@boper
  45. \fi}}%
  46. %
  47. %\check
  48. %
  49. \def\I@bldchk{\y@iv=0.05\b@eamlength\multiply \y@iv by \s@lopenum\relax
  50. \ifdim \y@iv<\n@ii\internote\relax
  51.   \advance\s@lopenum by 1\relax\I@bldchk
  52. \fi
  53. \ifnum \s@lopenum<-9\relax  \advance\n@i by -1\relax
  54.   \advance\n@ii by 1\relax\I@bldchk
  55. \fi}%
  56. %
  57. \def\I@bluchk{\y@iv=0.05\b@eamlength\multiply \y@iv by \s@lopenum\relax
  58. \ifdim \y@iv>\n@ii\internote\relax
  59.   \advance\s@lopenum by -1\relax\I@bluchk
  60. \fi}%
  61. %
  62. \def\I@bl#1#2#3#4{{\inhgetn@i{#3}\n@ii=\n@i\relax
  63. \inhgetn@i{#2}\advance\n@ii by -\n@i\relax
  64. \b@eamlength=\noteskip
  65. \multiply\b@eamlength by #4\relax
  66. \ifnum\n@ii=0\relax
  67.    \edef\I@boper{\noexpand #1}\I@boper{#2}0\relax
  68. \else\ifnum\n@ii>0\relax\s@lopenum=10\relax \I@bluchk
  69.       \else \s@lopenum=-10\relax \I@bldchk
  70.       \fi
  71.    \edef\I@boper{\noexpand #1{\the\n@i}{\the\s@lopenum}\relax}\I@boper
  72. \fi}}%
  73. %
  74. %\check
  75. % sets of double notes with computed slopes
  76. \def\Dqbbl#1#2{\Ibbl0{#1}{#2}1\qb0{#1}\tqb0{#2}}%
  77. \def\Dqbbu#1#2{\Ibbu0{#1}{#2}1\qh0{#1}\tqh0{#2}}%
  78. \def\Dqbl#1#2{\Ibl0{#1}{#2}1\qb0{#1}\tqb0{#2}}%
  79. \def\Dqbu#1#2{\Ibu0{#1}{#2}1\qh0{#1}\tqh0{#2}}%
  80. %\check
  81. % sets of triple notes with computed slopes
  82. \def\Tqbbl#1#2#3{\Ibbl0{#1}{#3}2\qb0{#1}\qb0{#2}\tqb0{#3}}%
  83. \def\Tqbbu#1#2#3{\Ibbu0{#1}{#3}2\qh0{#1}\qh0{#2}\tqh0{#3}}%
  84. \def\Tqbl#1#2#3{\Ibl0{#1}{#3}2\qb0{#1}\qb0{#2}\tqb0{#3}}%
  85. \def\Tqbu#1#2#3{\Ibu0{#1}{#3}2\qh0{#1}\qh0{#2}\tqh0{#3}}%
  86. %\check
  87. % sets of quadruple notes with computed slopes
  88. \def\Qqbbl#1#2#3#4{\Ibbl0{#1}{#4}3\qb0{#1}\qb0{#2}\qb0{#3}\tqb0{#4}}%
  89. \def\Qqbbu#1#2#3#4{\Ibbu0{#1}{#4}3\qh0{#1}\qh0{#2}\qh0{#3}\tqh0{#4}}%
  90. \def\Qqbl#1#2#3#4{\Ibl0{#1}{#4}3\qb0{#1}\qb0{#2}\qb0{#3}\tqb0{#4}}%
  91. \def\Qqbu#1#2#3#4{\Ibu0{#1}{#4}3\qh0{#1}\qh0{#2}\qh0{#3}\tqh0{#4}}%
  92. %\check
  93. \catcode`\@=\catcodeat
  94.  
  95.